﻿using LiteDB;

namespace KinonekoSoftware.Studio.UpgradeV3.Transformers
{
    public abstract class Transformer
    {
        public abstract void Migrate(LiteDatabase oldDB, LiteDatabase newDB, string oldRepoDir, string newRepoDir);
        
        public static string TransformGravatar(string value)
        {
            //
            // 旧版：avatar_Mm8ksPtr4k-mSjjF9zpNPg.png
            // 新版: c50dcd34ec91469bbf00667c3f63ed8d

            return value.AsSpan().Slice(7, value.Length - 7).ToString();
        }
    }
}